<?php

//Route::group(['namespace'=>'App\Http\Controllers\Api\Task','prefix'=>'api','middleware'=>'WebAuth'],function(){

//登录中间件
Route::group(['namespace'=>'App\Http\Controllers\Api\Home','prefix'=>'api'],function(){
    //地址列表
    Route::any('home/address_index', 'AddressController@address_index');
    //地址详情
    Route::any('home/get_address', 'AddressController@get_address');
    //添加地址
    Route::post('home/add_address', 'AddressController@add_address');
    //修改地址
    Route::post('home/update_address', 'AddressController@update_address');
    //删除地址
    Route::post('home/delete_address', 'AddressController@delete_address');

    //个人健康档案
    Route::any('home/health_archives', 'HomeController@health_archives');
    Route::post('home/update_archives', 'HomeController@update_archives');

    //文章管理
    //获取用户协议
    Route::any('home/agreement', 'ArticleController@get_agreement');
    //获取问题
    Route::any('home/problem', 'ArticleController@get_problem');
    //获取分类下的文章
    Route::any('home/category_article', 'ArticleController@category_article');
    //分类列表
    Route::any('home/category_index', 'ArticleController@category_index');
    //添加分类
    Route::post('home/add_category', 'ArticleController@add_category');
    //修改分类
    Route::post('home/update_category', 'ArticleController@update_category');
    //删除分类
    Route::post('home/delete_category', 'ArticleController@delete_category');
    //文章列表
    Route::any('home/article_index', 'ArticleController@article_index');
    //添加文章
    Route::post('home/add_article', 'ArticleController@add_article');
    //修改文章
    Route::post('home/update_article', 'ArticleController@update_article');
    //删除文章
    Route::post('home/delete_article', 'ArticleController@delete_article');
});